import { sequelize } from "./sequelize.js";
import { User } from "../model/User.js";

export const sync = async () => {
    await sequelize.sync();
    console.log("数据库连接成功");

    await User.sync({ force: true });
    console.log("模型导入数据库");

    User.bulkCreate([
        { uname: "贝吉塔", uage: 18 },
        { uname: "孙悟空", uage: 28 },
        { uname: "布欧", uage: 38 },
    ])

}